var redStr = '<font color="red">*</font>';
//  ************************ 多选下拉框******************************

//产品  
var targetProductsCombo= new Ext.ux.form.LovCombo({
	name:'targetProducts',
    fieldLabel: '产品',
    store:store,
    valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择目标产品',
	triggerAction: 'all',
	anchor:'90%',
	beforeBlur:function(){}

});
//  **********************************下拉框****************************

//产品线
var productLineComb = new Ext.form.ComboBox({
	name : 'collectionWay',
	fieldLabel: '产品线' + redStr,
	store:productLineStore,
	valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择需求途径',
	triggerAction: 'all',
	allowBlank:false,
	anchor:'90%',
	blankText : '产品线为必填项,请填写'
});

// 收集途径 下拉框
var collectionWayComb = new Ext.form.ComboBox({
	name : 'collectionWay',
	fieldLabel: '收集途径' + redStr,
	store:collectionStore,
	valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择需求途径',
	triggerAction: 'all',
	allowBlank:false,
	anchor:'90%',
	blankText : '需求途径为必填项'
});

//$APPEALS类型
var appealsTypeComb = new Ext.form.ComboBox({
	name:'appealsType',
    fieldLabel: '$APPEALS类型',
    store:	appealsStore,
    valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择$APPEALS类型',
	triggerAction: 'all'
});

//紧急度
var urgencyComb = new Ext.form.ComboBox({
	name:'urgency',
	fieldLabel: '紧急度',
	store:urgencyStore,
	valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择紧急度',
	anchor:'90%',
	triggerAction: 'all'
});

//重要度
var importanceComb = new Ext.form.ComboBox({
	name:'importance',
   	fieldLabel: '重要度',
  	store:importanceStore,
  	valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择重要度',
	anchor:'90%',
	triggerAction: 'all'
});

//需求类型
var requireTypeComb = new Ext.form.ComboBox({
	name:'requireType',
   	fieldLabel: '需求类型',
  	store:requireTypeStore,
  	valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择需求类型',
	anchor:'90%',
	triggerAction: 'all'
});

//区域
var areaComb = new Ext.form.ComboBox({
	name:'area',
   	fieldLabel: '区域',
  	store:provinceStore,
  	valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择区域',
	anchor:'90%',
	triggerAction: 'all'
});

// 行业
var industryComb = new Ext.form.ComboBox({
	name:'industry',
   	fieldLabel: '行业',
  	store:industryStore,
  	valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择行业',
	anchor:'90%',
	triggerAction: 'all'
});

// 细分市场
var subdivideMarketComb = new Ext.form.ComboBox({
	name:'subdivideMarket',
   	fieldLabel: '细分市场',
  	store:subdivideMarketStore,
  	valueField: 'id',
	displayField:'value',
	forceSelection:true,
	emptyText:'请选择细分市场',
	anchor:'90%',
	triggerAction: 'all'
});


// ************************   TextField   *******************************
//目标客户/市场
var targetCMText = new Ext.form.TextField({
    name:'targetCM',
    fieldLabel: '目标客户/市场',
	emptyText:'请选填写目标客户/市场'
});

//产品特性/解决方案描述项
var proText = new Ext.form.TextField({
  	name:'pro',
   	fieldLabel:'产品特性/解决方案描述项',
	emptyText:'请选填写目标客户/市场'
});

// 需求者名字
var customerNameText = new Ext.form.TextField({
  	fieldLabel: '联系人',
  	border : false,
	name: 'customerName',
 	anchor:'90%'
});

// 需求者职位
var customerDepartmentText = new Ext.form.TextField({
  	fieldLabel: '职位',
  	border : false,
	name: 'customerDepartment',
 	anchor:'90%'
});

// 联系方式
var phoneText = new Ext.form.TextField({
  	fieldLabel: '联系方式',
  	border : false,
	name: 'phone',
 	anchor:'90%'
});

// 公司名称-客户名称
var companyText = new Ext.form.TextField({
  	fieldLabel: '客户名称',
  	border : false,
	name: 'company',
 	anchor:'90%'
});

//业务活动
var busiActText = new Ext.form.TextField({
  	fieldLabel: '关联业务活动',
  	border : false,
	name: 'busiAct',
 	anchor:'90%'
});

//硬件版本
var hardwareVerText = new Ext.form.TextField({
  	fieldLabel: '硬件版本',
  	border : false,
	name: 'hardwareVer',
 	anchor:'90%'
});

//软件版本
var softwareVerText = new Ext.form.TextField({
  	fieldLabel: '软件版本',
  	border : false,
	name: 'softwareVer',
 	anchor:'90%'
});


// 5 w 1 h 1 E
//why
var whyText = new Ext.form.TextField({
  	fieldLabel: 'why'+ redStr,
  	border : false,
	name: 'why',
	emptyText:'用户认为该问题不可忍受的原因是什么？',
	allowBlank:false,
 	anchor:'90%'
});
//who
var whoText = new Ext.form.TextField({
  	fieldLabel: 'who'+ redStr,
  	border : false,
	name: 'who',
	emptyText:'是谁使用了该系统?',
	allowBlank:false,
 	anchor:'90%'
});
//when
var whenText = new Ext.form.TextField({
  	fieldLabel: 'when'+ redStr,
  	border : false,
	name: 'when',
	emptyText:'用户什么时间进行的操作，导致了该问题?',
	allowBlank:false,
 	anchor:'90%'
});
//where
var whereText = new Ext.form.TextField({
  	fieldLabel: 'where'+ redStr,
  	border : false,
	name: 'where',
	emptyText:'用户的应用环境是什么样的?',
	allowBlank:false,
 	anchor:'90%'
});
//what
var whatText = new Ext.form.TextField({
  	fieldLabel: 'what'+ redStr,
  	border : false,
	name: 'what',
	emptyText:'用户做了什么操作?',
	allowBlank:false,
 	anchor:'90%'
});
//how
var howText = new Ext.form.TextField({
  	fieldLabel: 'how'+ redStr,
  	border : false,
	name: 'how',
	emptyText:'用户具体的操作是怎样的?有哪些具体步骤?',
	allowBlank:false,
 	anchor:'90%'
});

//experience
var experienceText = new Ext.form.TextField({
  	fieldLabel: 'experience'+ redStr,
  	border : false,
	name: 'experience',
	emptyText:'用户的侧重点是什么?需求如何解决它的问题?',
	allowBlank:false,
 	anchor:'90%'
});


//************************  CCM 特殊定制
//项目名称
var projectNameText = new Ext.form.TextField({
  	fieldLabel: '项目名称'+ redStr,
  	border : false,
	name: 'projectName',
	allowBlank:false,
 	anchor:'90%'
});

//CRM编号
var crmIdext = new Ext.form.TextField({
  	fieldLabel: 'CRM编号'+ redStr,
  	border : false,
	name: 'crmId',
	allowBlank:false,
 	anchor:'90%'
});

//销售
var marketText = new Ext.form.TextField({
  	fieldLabel: '销售'+ redStr,
  	border : false,
	name: 'market',
	allowBlank:false,
 	anchor:'90%'
});

//售前
var preSalesText = new Ext.form.TextField({
  	fieldLabel: '售前'+ redStr,
  	border : false,
	name: 'preSales',
	allowBlank:false,
 	anchor:'90%'
});

//项目金额
var proAmountText = new Ext.form.TextField({
  	fieldLabel: '项目金额'+ redStr,
  	border : false,
	name: 'proAmount',
	allowBlank:false,
 	anchor:'90%'
});

//预计销售额
var estimatSalesText = new Ext.form.TextField({
  	fieldLabel: '预计销售额'+ redStr,
  	border : false,
	name: 'estimatSales',
	allowBlank:false,
 	anchor:'90%'
});


// ************************   TextArea   *******************************
var customerProDesArea = new Ext.form.TextArea({
	name:'customerProDes',
   	fieldLabel: '客户问题描述',
	emptyText:'',
	anchor:'90%',
	height:100
});

var operSceneDesArea = new Ext.form.TextArea({
	name:'operSceneDes',
  	fieldLabel: '操作场景描述',
	emptyText:'',
	hidden:true,
	anchor:'90%',
	height:100
});


//产品特性/解决方案描述项
var productDisText = new Ext.form.TextArea({
  	fieldLabel: '产品特性/解决方案描述项',
  	border : false,
	name: 'productDis',
	//allowBlank:false,
	emptyText:'描述客户或需求提出者对解决该需求的产品特性或解决方案建议',
	height:50,
 	anchor:'90%'
});

// *************************  DateField *******************

//招标时间
var biddingTime = new Ext.form.DateField({
	fieldLabel: '招标时间'+ redStr,
	name: 'biddingTime',
	anchor:'90%',
	format: 'Y-m-d',
	allowBlank:false
});

//合同签订时间
var contractTime = new Ext.form.DateField({
	fieldLabel: '合同签订'+ redStr,
	name: 'contractTime',
	anchor:'90%',
	format: 'Y-m-d',
	allowBlank:false
});

//承诺答复
var CommitReplyTime = new Ext.form.DateField({
	fieldLabel: '承诺答复'+ redStr,
	name: 'CommitReply',
	anchor:'90%',
	format: 'Y-m-d',
	allowBlank:false
});

// ********************laber*******************
var label = new Ext.form.Label({
  	id:"labelID",
   	text:"↓↓操作场景描述,请按照 5W1H1E 方式填写↓↓"
              
});

// ********************************* 加红 ********************
//customerNameText.on('render',addRedStar);
function addRedStar(obj)
{
    var font=document.createElement("font");
    font.setAttribute("color","red");
    var redStar=document.createTextNode('*');
    font.appendChild(redStar);    
    obj.el.dom.parentNode.appendChild(font);
}